/**  
* @Title: ExposeRevealController.java 
* @Description:   
* @author Lengxf  
* @date 2019年3月11日    
*/  
package com.penghaisoft.microwms.product.web.controller.expose;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.penghaisoft.microwms.common.controller.BaseController;
import com.penghaisoft.microwms.common.dto.TransResult;
import com.penghaisoft.microwms.common.page.Pager;
import com.penghaisoft.microwms.common.wms.model.ProStorageSn;
import com.penghaisoft.microwms.product.service.IProStorageSnService;

/**  
* @Title: ExposeRevealController 
* @Description:   成品展示接口
* @author Lengxf  
* @date 2019年3月11日    
*/
@RestController
@RequestMapping(value = "/expose/revealPro")
public class ExposeRevealController extends BaseController{
	
	@Autowired
	private IProStorageSnService proStorageSnService;
	
	/**  
	 * @Title: findQuantitiyProduct
	 * @Description:   接口-成品库存展示
	 * @author Lengxf  
	 * @date 2019年3月11日    
	 */  
	@PostMapping("product/quantitiy")
	public TransResult findQuantitiyProduct(@RequestBody ProStorageSn proStorageSn) {
		Pager<ProStorageSn> result = proStorageSnService.findQuantitiyProduct(proStorageSn.getPage(),
				proStorageSn.getRows(), proStorageSn);
		return success(result);
	}
	
	/**  
	 * @Title: findQuantitiyProductToSn
	 * @Description:   接口-成品库存明细展示
	 * @author Lengxf  
	 * @date 2019年3月11日    
	 */  
	@PostMapping("productSn/quantitiy")
	public TransResult findQuantitiyProductToSn(@RequestBody ProStorageSn proStorageSn) {
		Pager<ProStorageSn> result = proStorageSnService.findQuantitiyProductToSn(proStorageSn.getPage(), 
				proStorageSn.getRows(), proStorageSn);
		return success(result);
	}
	
	/**  
	 * @Title: findQuantitiyProductInTime
	 * @Description:   手机APP展示接口-成品超期、未超期库存，无需传参
	 * @author Lengxf  
	 * @date 2019年3月18日    
	 */  
	@PostMapping("productInTime/quantitiy")
	public TransResult findQuantitiyProductInTime(ProStorageSn proStorageSn) {
		List<ProStorageSn> result = proStorageSnService.findQuantitiyProductInTime(proStorageSn);
		return success(result);
	}

}
